package bb.lanxing.lib.devices.ble.x1;

import android.os.RemoteException;

public class RemoteX1Controller implements X1Controller {
    private final IRemoteX1Contraoller mRemoteController;

    public RemoteX1Controller(IRemoteX1Contraoller iRemoteX1Contraoller) {
        this.mRemoteController = iRemoteX1Contraoller;
    }

    @Override
    public void set(int i, float f, int i2) {
        IRemoteX1Contraoller iRemoteX1Contraoller = this.mRemoteController;
        if (iRemoteX1Contraoller != null) {
            try {
                iRemoteX1Contraoller.set(i, f, i2);
            } catch (RemoteException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    public void reset(X1DisplayData x1DisplayData) {
        IRemoteX1Contraoller iRemoteX1Contraoller = this.mRemoteController;
        if (iRemoteX1Contraoller != null) {
            try {
                iRemoteX1Contraoller.reset(x1DisplayData);
            } catch (RemoteException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    public void stop() {
        IRemoteX1Contraoller iRemoteX1Contraoller = this.mRemoteController;
        if (iRemoteX1Contraoller != null) {
            try {
                iRemoteX1Contraoller.stop();
            } catch (RemoteException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    public boolean isConnected() {
        IRemoteX1Contraoller iRemoteX1Contraoller = this.mRemoteController;
        if (iRemoteX1Contraoller != null) {
            try {
                return iRemoteX1Contraoller.isConnected();
            } catch (RemoteException e) {
                e.printStackTrace();
                return false;
            }
        }
        return false;
    }

    @Override
    public void send(X1DisplayData x1DisplayData) {
        IRemoteX1Contraoller iRemoteX1Contraoller = this.mRemoteController;
        if (iRemoteX1Contraoller != null) {
            try {
                iRemoteX1Contraoller.send(x1DisplayData);
            } catch (RemoteException e) {
                e.printStackTrace();
            }
        }
    }
}
